     ZTETRIS v1.6 -   by Jimmy Mrdell  <yarin@acc.umu.se>
                      Sam Heald <evil_sam@hotmail.com>
                      Patrick Davidson <eeulplek@hotmail.com>

	Ti-83 Version by Ahmed El-Helw <ahmedre@bellsouth.net>
			 AShell Version

	Note - Please read the revision history. Thanks.


FEATURES
--------
 * 21 levels (0-20). You can choose which level to start between
   (only start on level 0-9 though).

 * 16 different level patterns!

 * Hiscore table with names! The three best results are saved.

 * Teacher key! If you see your techer heading your way, quickly
   press the teacher key to return to TI-OS, and when you start
   the game the next time, you'll automatically resume where you
   was. If you run it from a shell however, it returns to the
   shell instead. But that's your problem, not mine :)

 * Linkplay! Play against each other and kick some butt! The link
   protocol is the same as in ZTetris for the 86 and Tetris for Fargo,
   so you could link an 82 to an 85, 86, or a 92 and play against each other!

 * The scoring is almost the same from the Game Boy version. The last digit
   in the score isn't shown (you could think of it that way anyway) because
   of several reasons. Unlike the ZShell version, you also score for
   dropping or moving down a piece.

 * You can start with trashlines. It's different from the gameboy version
   though, because there is no win-when-cleared-25-lines.

 * In linkplay, you can choose if you want to get scrambled (as in Tetris
   for Windows) or unscrambled (Tetris for Gameboy) lines.

 * Rotation in both direction. You can pause the game (1 player)

CONTROL
-------
Choosing players:    Up/Down      - Change number of players
		     1/2          - Choose that number of players
		     Clear        - Quit

At the option menu:  Arrowkeys    - Choose level
		     Enter        - Start level
		     S            - Toggle "2-4 lines", "1-3 lines" (LP only)
		     L            - Toggle scrambled/unscrambled lines (LP)
		     Trace        - Decrease start high
		     Graph        - Increase start high
		     Clear        - Quit game

When playing:        Left & Right - Move the piece to the left and right
		     Up & 2nd     - Rotate clockwise
		     Down         - Move the piece faster down
		     xto          - Drop key
		     Alpha        - Rotate anti-clockwise
		     Clear        - Quit game
		     Mode         - Pause
		     Del          - Teacher key. Quickly jumps out to
				    TI-OS. The game will resume when you
				    start it the next time.

When typing name:    A-Z, Space   - Enter letter (max 10 chars)
		     Enter        - Continue
		     Left arrow   - Backspace

SCORING
-------
	   L 0    L 1   L 2   L 3   L 4   L 5   L 6   L 7   L 8    L 9
1 line   |    4 |   8 |  12 |  16 |  20 |  24 |  28 |  32 |   36 |   40 |
2 lines  |   10 |  20 |  30 |  40 |  50 |  60 |  70 |  80 |   90 |  100 |
3 lines  |   30 |  60 |  90 | 120 | 150 | 180 | 210 | 240 |  270 |  300 |
4 lines  |  120 | 240 | 360 | 480 | 600 | 720 | 840 | 960 | 1080 | 1200 |

When dropping a piece, your score will increase with dropsteps/10 (the
last digit will remain in memory, although not shown). Every time you
move the piece down (with the down key) you will increase the score with
0.1.

LINKPLAY
--------
To play linkplay, first connect two TI-82's (or connect the TI-82 to a
TI-85, TI-86, or a TI-92) and choose two player mode. The level selection
menu looks slightly different. Besides from choosing which level to start at
(the two players can start at different levels), you can choose how many
penalty lines should be sent to the other calc when clearing lines. Either
you send 2-4 lines (if you get 2-4 lines) or 1-3, ie one line less than you
cleared. This option can also be different on both calcs, thus allowing
handicap. You can also toggle if you want to get unscrambled penalty lines
or scrambled penalty lines. If choosing unscramble (defualt), the lines sent
to you will only have one gap, making it much easier than getting totally
scrambled lines.

Press Enter to start the game. Now the calc will go into waiting mode and
wait until the other player has reached this mode. When one player enters
the waiting mode, the other player MUST have started ZTetris (or be in an
assembly shell) because else the game would start immediately for the first
player. If you link with a TI-85 or a TI-86 or a TI-92, the other calc must
enter Waiting mode first.

Now the fun begins!

You play as you usually do, but when you clear 2 or more lines, the other
opponent will get penalty lines depening on how many lines you cleared and
the option choosed when selecting startlevel.

There is also a bar telling how high up in the playing field your opponent
is (it's not visible in the beginning since the field is empty). This is
good when choosing strategy.

When a player loses, or aborts the game, a "You won" message will appear
on the other calc.

You can't pause or use the teacher key in two player mode, and you can
neither enter the hiscore table (even though score is counted)

When you play against an 85/86 know that the 82 version runs slightly
faster than those versions. Set the 85/86, one level higher than the 82
to even things out.

KNOWN BUGS
----------
 * Don't pull out the linkcable while playing twoplayer! The calcs
   may freeze a few seconds (not crash).
 * The linkplay probably isn't that stable, and the calc may freeze
   sometimes for a short time. It is also possible that one player
   may "miss" some penalty lines :) See this as a feature instead hehe :)
 * Doesn't work with CrASH

VERSION HISTORY
---------------
1.0  First release version. No next piece shown (I think...)
1.1  Added next piece + some other things (don't remember)
2.0  Linkplay, dropkey, clear screen when pausing, fixed teacher key bug,
     better random routines and other details
2.1  Possibility to start with "High", toggle between scrambled/unscrambled
     lines in linkplay, huge linkplay improvement, background patterns
2.11 Fixed a bug which causes the calc to crash when you pressed Exit
     when waiting on the other calc (the crash happened when you run
     ZTetris the next time).
3.0  Optimized ZTetris to fit Usgard. Better scoring system.
*************CONVERTED TO THE 82***********************
0.9   First 82 release. No background patterns.     
      SIZE:3114

0.91  Added background patterns.                    
      SIZE:3509

0.92  Fixed pause bug
      Fixed speed
      Adjusted Gaps and Information
      Saved 109 bytes
      SIZE:3400

0.93  *Never Released due to lack of an internet connection*
      Fixed a minor unnoticed bug
      Moved Next piece display and gap
      Optimized 6 bytes 
      SIZE:3394    

0.99  Fixed Title screen bug
      Added 99 bytes :(
        -Size is only temporary because I need to find a better way
         to fix the title screen. Right now my method is extremely crude
         and poorly coded. Sorry. Wait till v1.0. The game will be under
         3300 bytes, I promise.
      SIZE: 3493

*************CONVERTED TO THE 83***********************
0.92  Simple single player works
      Kinda buggy
      Dual Player doesn't work

0.93  Fixed all the single player bugs
0.94  Added Link Play support!  
0.95  Fixed the slow key movements
0.96  Fixed up the extra fast speed
0.99  Normal speed, equivelent to the 82
1.00  First release, 100% working, fixed pixel bug, didn't add 99 bytes :) Size - 3415

1.10  As you can see, this zip file has 2 83p's.  Let me explain.  Several people have
      complained to me about flashing pixels.  This I found out was only on calculators
      that are turboed.   Thus, there are 2 83p's in this package, the ztetris.83p is the
      standard one, for people with a normal 83p.  It is almost identical to the last
      release, except that I fixed a few minor details.  It is also the same size, 3415.

      Now the other version is also an option, but it is meant for people with turboed
      calculators, because I don't really recommend it.  The only difference between
      these two versions is the graph buffer copy routine, the normal one uses Joe's 
      fast copy.  This version, on the other hand, uses _grbufcpy_v, which has some
      cons - mainly - its a tad bit slower, especially noticable with keypresses on
      non turboed 83s.  I don't know how it would work out on the turboed 83, but it
      should stop the flickering.  Of course, some of you might use the top one for
      the speed, but that's up to you.  This version is a lot smaller than the other one,
      about 3366 bytes to be exact, which is about 50 bytes smaller.  Nevertheless, it
      is kinda slow.  Anyways, for the people with turboed calcs, if Joe ever fixes
      his FastCopy routine to work with the turboed calcs, then I might as well release
      a version 1.2 for the 83, but until then, we'll see.

1.2   Ok, last version had two versions, one which was 50 bytes smaller
      to fix up the turboed calculator bug.  In reality, the problem
      was the routine I suspected, yet nevertheless, it occured on some non-turboed
      calculators as well.  Thus, Joe has finally fixed his ZGFXL library and I can now
      say that the bug is fixed.  Here is what is new in this release:

		1. Fixed the pixel flashing bug [thanks to Joe [fixing his ZGFXL],
	           Djpupon [reporting the bug and letting me know when it worked],
		   as well as Dustin Graham [also reporting the bug], and anyone else.

		2. Fixed the APD Bug, which messed up your calculator if you left
		   it on in pause mode for 5 min.  I think now this should be fixed,
		   and credits go to BlackBelt for reporting this bug.

		3. The program has dropped in size to 3413, which means its 7 bytes smaller!
		   It was 3417, but due to the fact that I had to fix the APD bug, 4 
		   additional bytes were added.  Yet it should all work out now.  This
		   version is bigger than the SOS version, but that's because you have
		   to clear the screen and graph buffer, so it adds about 6 bytes.  But
		   its the exact game, so for all you AShell lovers, here you go.  This
		   version is smaller than the 1.1 SOS version, so not bad :)  Still, if
		   you use SOS, get the SOS version, its a few bytes smaller :)

1.3 - Probably the last release, file size is about 80 bytes smaller
      than previous versions.

1.6   *Updated by Sam Heald
    - Fixed the speed (exactly like 82,86 versions)
    - Fixed Blinking text bug (no more black line)
    - Changed pause screen to shut down after ~1 minute (battery saver)
    - Size: 3378 bytes
 


FUTURE VERSIONS
---------------
x Nothing else 83 related :)

 If you have any other suggestions about more features, mail them to
 Sam Heald at evil_sam@hotmail.com.

 But if they are 83 related, email them to ahmed@ticalc.org
 While your at it, check my page at http://ahmed.ticalc.org

THANKS
------
Special thanks to...
 Pascal Bouron   - great link routines!
 Martin Hock     - example source on how to use those link routines
 CalcEm Author   - His emulator was a huge help!
 Ahmed El-Helw   - beta testing and helped with backgrounds
 Joe Wingbermule - helped with backgrounds
 Mark May (OBD)  - beta testing and trying to help
 Dines Christy Justesen - Trying to help
 Derrick Ward    - beta testing, trying to help when possible, and maintaining our page.
 Bryan Rabeler &
  Kouri Rosenberg - For repeatedly crashing their calcs for good of Ztetris.
   And the rest of the beta testers...
....and most of all
 Patrick Davidson - For teaching me everything I know about asm, and
                    solving the major bugs that I(Sam) could not.

Ti-83 Thanks...
 Florent Dhordain - the link routines!
 Joe Wingerbermuhle - the faster graph buffer copy [and fixing it!] 
 Djpupon, Dustin Graham, and BlackBelt - for reporting the bugs
 My Beta Testers - for suggestions.
 
HOW TO CONTACT (SAM) ABOUT THE 82 VERSION
-----------------
The best way is to send an email to evil_sam@hotmail.com.

  Visit my webpage at void.calc.org for the latest info.

------------------------------------------------------------------------------
HOW TO CONTACT (PATRICK) ABOUT THE 82 VERSION
----------------
     WWW - http://pad.calc.org
   EMail - ariwsi@juno.com
           ariwsi@rocketmail.com
           eeulplek@hotmail.com

------------------------------------------------------------------------------

Contacting Ahmed about 83 Version - ahmed@ticalc.org
			           http://ahmed.ticalc.org
					ICQ: 3350394
				   IRC: Ahmed or AhmedRE

HOW TO CONTACT (JIMMY) ABOUT ANY OTHER VERSION OF ZTETRIS
-----------------
The easiest way is to send an email to mja@algonet.se, but you can also
find me on IRC, #calc-ti at EFnet with the nick Yarin. I'm usually there
about 11:00 pm - 02:00 am CET (5:00-8:00 EST).
IRC......: Yarin                             
Email....: mailto:yarin@acc.umu.se        
Homepage.: http://www.acc.umu.se/~yarin/
------------------------------------------------------------------------------
//Ahmed El-Helw <ahmedre@bellsouth.net / http://asm8x.home.ml.org>
//Sam Heald <evil_sam@hotmail.com / http://www.cswnet.com/~ddward/index.html>
//Jimmy Mrdell <yarin@acc.umu.se / http://www.acc.umu.se/~yarin>
//Patrick Davidson <eeulplek@hotmail.com>